import javax.imageio.stream.FileImageInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Test31 {
    public static void main(String[] args) {
        System.out.println("m1执行");
        try {
            m1();
        } catch (FileNotFoundException e) {
            System.out.println("错误！！！文件不存在！");
        }
        System.out.println("m1执行完毕");
        //异常
        MyException e =new MyException("用户名不能为空！！！");
        //打印异常信息
        e.printStackTrace();
    }
    public static void m1() throws FileNotFoundException {
        System.out.println("m2执行");
        m2();
        System.out.println("m2执行完毕");
    }
    public static void m2  () throws FileNotFoundException {
        System.out.println("m3执行");
        m3();
        System.out.println("m3执行结束");
    }
    public static void m3() throws FileNotFoundException {
       new FileInputStream("F:\\xiaoqian\\ADDD\\alexander");
    }
}
class MyException extends Exception{
    public MyException() {
    }

    public MyException(String m) {
        super(m);
    }
}

